package com.xj0927.springcloud.service.imp;

import com.xj0927.springcloud.dao.PaymentDao;
import com.xj0927.springcloud.entities.Payment;
import com.xj0927.springcloud.service.PaymentService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: xj0927
 * @Description: 真正的调用还是在实现层【即调用的还是接口中的方法】
 * @Date Created in 2020-10-22 16:43
 * @Modified By:
 */
@Service  //养成好习惯
public class PaymentServiceImp implements PaymentService{

    @Autowired
    private PaymentDao paymentDao;

    public int create(Payment payment){
        return paymentDao.create(payment);
    }

    public Payment getPaymentById(Long id){
        return paymentDao.getPaymentById(id);
    }
}
